oops, r43111 was incomplete, here's the rest of it :-/
authorIlmari Karonen <vyznev@users.mediawiki.org>
Mon, 3 Nov 2008 08:08:02 +0000 (08:08 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Mon, 3 Nov 2008 08:08:02 +0000 (08:08 +0000)
includes/specials/SpecialPreferences.php

index ca13d68..6f88b8b 100644 (file)
@@ -42,7 +42,7 @@ class PreferencesForm {
                $this->mStubs = $request->getVal( 'wpStubs' );
                $this->mRows = $request->getVal( 'wpRows' );
                $this->mCols = $request->getVal( 'wpCols' );
-               $this->mSkin = $request->getVal( 'wpSkin' );
+               $this->mSkin = Skin::normalizeKey( $request->getVal( 'wpSkin' ) );
                $this->mMath = $request->getVal( 'wpMath' );
                $this->mDate = $request->getVal( 'wpDate' );
                $this->mUserEmail = $request->getVal( 'wpUserEmail' );
@@ -268,7 +268,10 @@ class PreferencesForm {
                $wgUser->setOption( 'variant', $this->mUserVariant );
                $wgUser->setOption( 'nickname', $this->mNick );
                $wgUser->setOption( 'quickbar', $this->mQuickbar );
-               $wgUser->setOption( 'skin', $this->mSkin );
+               global $wgAllowUserSkin;
+               if( $wgAllowUserSkin ) {
+                       $wgUser->setOption( 'skin', $this->mSkin );
+               }
                global $wgUseTeX;
                if( $wgUseTeX ) {
                        $wgUser->setOption( 'math', $this->mMath );